﻿@model IEnumerable<CRM_AKCPA.Models.Customer>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name_Prefix)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Last_Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Middle_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.First_Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Business_Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.LegalName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Phone_Number)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Cell_Phone)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Fax)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Customer_Account)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AspNetUser.UserName)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name_Prefix)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Last_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Middle_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.First_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Business_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LegalName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Phone_Number)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Cell_Phone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Fax)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Customer_Account)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.AspNetUser.UserName)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.CustomerId }) |
            @Html.ActionLink("Details", "Details", new { id=item.CustomerId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.CustomerId })
        </td>
    </tr>
}

</table>
